package com.car.service.impl;

import com.car.dao.KindMapper;
import com.car.entity.Kind;
import com.car.service.IKindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("kindService")
public class KindService implements IKindService {
    @Autowired
    @Qualifier("kindMapper")
    private KindMapper kindMapper;

    @Override
    public List<Kind> findKind() {
        return kindMapper.findKind();
    }

    @Override
    public int addKind(Kind kind) {
        return kindMapper.addKind(kind);
    }

    @Override
    public int deleteKind(int kid) {
        return kindMapper.deleteKind(kid);
    }

    @Override
    public Kind findKindById(int kid) {
        return kindMapper.findKindById(kid);
    }

    @Override
    public int updateKind(Kind kind) {
        return kindMapper.updateKind(kind);
    }
}
